<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes spin {
            to {
                transform: rotate(1turn);
            }
        }

        .avatar {
            animation: spin 10s infinite linear;
            transform-origin: 50% 150px;
        }

        .avatar>img {
            animation: inherit;
            /* 给内部元素设置一个反向的动画 */
            animation-direction: reverse;
        }

        /* Anything below this is just styling */

        .avatar {
            width: 50px;
            margin: 0 auto;
            border-radius: 50%;
            overflow: hidden;
        }

        .avatar>img {
            display: block;
            width: inherit;
        }

        .path {
            width: 300px;
            height: 300px;
            padding: 20px;
            border-radius: 50%;
            background: #fb3;
        }
    </style>
</head>

<body>
    <div class="path">
        <div class="avatar">
            <img src="http://lea.verou.me/book/adamcatlace.jpg" />
        </div>
    </div>
</body>

</html>